﻿<%@ Page Language="C#" MasterPageFile="~/Student/StuMasterPage.master" AutoEventWireup="true"
    CodeFile="ShowNews.aspx.cs" Inherits="Student_Default2" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentBody" runat="Server">
    <form id="form1" runat="server">
        <div id="contnet" style="text-align: center;">
            <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333">
                <ItemTemplate>
                    <!--id:
                <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>'></asp:Label><br />
                -->
                    <!-- title:-->
                    <h2>
                        <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>'></asp:Label><br />
                    </h2>
                    发布人:
                    <asp:Label ID="publisherLabel" runat="server" Text='<%# Eval("publisher") %>'></asp:Label>
                    发布日期:
                    <asp:Label ID="dateLabel" runat="server" Text='<%# Eval("date") %>'></asp:Label><br />
                    <!--body:-->
                    <p>
                        <asp:Label ID="bodyLabel" runat="server" Text='<%# Eval("body") %>'></asp:Label><br />
                    </p>
                    <br />
                </ItemTemplate>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingItemStyle BackColor="White" />
                <ItemStyle BackColor="#EFF3FB" />
                <SelectedItemStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            </asp:DataList><asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:onlineexamConnectionStringForNews %>"
                SelectCommand="SELECT * FROM [t_news] WHERE ([id] = @id)">
                <SelectParameters>
                    <asp:QueryStringParameter Name="id" QueryStringField="id" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
        </div>
    </form>
</asp:Content>
